package day20.tarena.io;
import java.util.*;
import java.io.*;
public class TestProperty {
	public static void main(String[] args) throws Exception {
		Properties p = new Properties();
		FileInputStream fis  = new FileInputStream("../../profile/oracle.properties");
		p.load(fis);
		fis.close();
		String url = p.getProperty("url");
		String username = p.getProperty("username");
		String passwd = p.getProperty("passwd");
		/**
		 *处理中文乱码问题的方案,
		 *现将字符用ISO8859-1来拆分，再用UTF－8，来组合。
		 */ 
	 	username =  new String (
	 				username.getBytes("ISO8859-1"),"UTF-8");
		System.out.println(url);
		System.out.println(username);
		System.out.println(passwd);
	}

}
